home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / patches / fw30int6.lha / Install FinalWriter-030 < prev    next >
Text File  |  1995-06-14  |  2KB  |  88 lines

  1. ; $VER: FinalWriter-030_Install 1.8 (14.6.95)
  2.  
  3. (set version "3.0")
  4.  
  5. (onerror (exit (quiet)))
  6.  
  7. (message
  8.     "\n\nFinalWriter " version "-030 International"
  9.     "\nCopyright 1995 Martin Berndt"
  10.     "\n\n\nThis Patch is SHAREWARE !"
  11.     "\n\nPlease read the \"ReadMe.txt\" file."
  12. )
  13.  
  14. (set @default-dest
  15.     (askdir
  16.         (prompt "Where is your FinalWriter Drawer?")
  17.         (help @askfile-help)
  18.         (default "SYS:FinalWriter")
  19.         (newpath)
  20.     )
  21. )
  22.  
  23. (set language
  24.     (askchoice
  25.         (prompt "Select Language")
  26.         (help @askchoice-help)
  27.         (choices "US1  23-Nov-94 (American English)"
  28.              "US2  14-Dec-94 (American English)"
  29.              "US3   3-Jan-95 (American English)"
  30.              "US4  13-Mar-95 (American English)"
  31.              "GB1  23-Nov-94 (British English)"
  32.              "GB2  14-Dec-94 (British English)"
  33.              "GB3   3-Jan-95 (British English)"
  34.              "GER1  7-Dec-94 (German)"
  35.              "GER2 14-Dec-94 (German)"
  36.              "GER3  3-Jan-95 (German)"
  37.              "GER4  3-Mar-95 (German)")
  38.     )
  39. )
  40.  
  41. (set backup
  42.     (askoptions
  43.         (prompt "Options")
  44.         (help @askoptions-help)
  45.         (choices "Create Backup Files")
  46.     )
  47. )
  48.  
  49. (set n 0)
  50. (set percent 0)
  51.  
  52. (while (set name (select n "FinalWriter" "swpost.library" "swshell.library"
  53.                "cachemap.library" "qfont.library" "")) (
  54.     (set n (+ n 1))
  55.     (complete percent)
  56.     (if (= n 1)
  57.         (set file name)
  58.         (set file (cat "FWLibs/" name))
  59.     )
  60.     (set newfile (tackon @default-dest file))
  61.     (set oldfile (cat newfile ".bak"))
  62.     (if (= (exists newfile) 0)
  63.         (abort name " not found!")
  64.     )
  65.     (rename newfile oldfile)
  66.     (if (< n 4) (
  67.         (if (= n 1)
  68.             (set name (cat name (select language "US1" "US2" "US3" "US4" "GB1" "GB2" "GB3" "GER1" "GER2" "GER3" "GER4")))
  69.         )
  70.         (working "\n\n" newfile)
  71.         (if (<> (run (cat "spatch \"-o" newfile "\" -p" name ".pch \"" oldfile "\"")) 0) (
  72.             (rename oldfile newfile)
  73.             (abort "Wrong Version!")
  74.         ))
  75.         (set percent (+ percent 30))
  76.     ) (
  77.         (copyfiles
  78.             (prompt "Copying " name)
  79.             (help @copyfiles-help)
  80.             (source name)
  81.             (dest (tackon @default-dest "FWLibs"))
  82.             (optional "force" "askuser")
  83.         )
  84.         (set percent (+ percent 5))
  85.     ))
  86.     (if (= backup 0) (delete oldfile))
  87. ))
  88.